/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.timesoft.zk.common.validator;

import org.apache.log4j.Logger;

/**
 *
 * @author sorasaks
 */
public class ValidateManager {
    
    private static final Logger LOG = Logger.getLogger(ValidateManager.class);
    
    private Boolean result;
    
    public ValidateManager() {
        this.result = Boolean.TRUE;
    }
    
    public void add(Validation validation) {
        Boolean value = validation.getResult();
        if(result.equals(Boolean.TRUE)) {
            result = value;
        }
    }

    public Boolean getResult() {
        LOG.info("::::::::::::: result :::::::::::::" + result);
        return result;
    }
}
